package com.shop.dao;

import com.shop.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface LoginDao {

    // 检查用户名是否存在
    boolean checkUsernameExists(@Param("username") String username);

    // 登录判断
    User getUserByUsername(@Param("username") String username);


    int register(@Param("username") String username, @Param("password") String encryptedPassword,@Param("role")  String role);
}